<?php
/**
 * Created by PhpStorm.
 * User: yellow
 * Date: 2019/4/1
 * Time: 14:57
 */

namespace app\common\model;

use think\Model;

class Study extends Model
{
    public function StudyCate(){
        return $this->hasOne('StudyCate', 'id', 'cate_id')->bind([
            'cate_name'=>'name'
        ]);
    }
    public function getThumbAttr($value){
        return $value?config('database.img_url').$value:'';
    }
}